from django.http import *
from django.shortcuts import *
from django.template import RequestContext
from gironimo.page.models import Page


def view_page(request, url=''):
    from django import template
    try:
        page = Page.objects.get(url=u'/%s' % url)
    except Page.DoesNotExist:
        raise Http404()
    return HttpResponse(page.template.render(context_instance=RequestContext(request)))

